<?php
class home_controller{

	public function __construct(){}
	
	/*Returns an array of Photo*/
	public function getHomePhotos()
	{
		$photoList = array();
		
		$homeModel = new Home();
		$homeList = $homeModel->selectAll();
	
		foreach($homeList as $home){
			$imageModel = new Photo();
			$imageList = $imageModel->selectFromPrimaryKey($home["photo_id"]);			
			$photoList[] = $imageList['url'];
		}
		
		return $photoList;
	}
}
?>